package tt.srvinst2;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class ProducerController {
    @Value("${server.port}")
    private Integer port;
    @Value("${test.name}")
    private String testName;
    @Autowired
    private RestTemplate restTemplate;

    @RequestMapping("/hello")
    @ResponseBody
    public String sayHello(@RequestParam("name") String name) {
        return "hello ---> " + name + " port -->" + port + "::::" + testName;
    }
}
